import { baseConsoleCommander, rule } from '../../src';
import { noop } from '../../src/utils/noop';

export default baseConsoleCommander({
  commands() {
    this.create('hello:world')
      .showInHelp()
      .docs({ description: 'Hello World Description!' })
      .action(noop);
    this.create('hi:world').showInHelp(false).action(noop);
  }
});

export const other = baseConsoleCommander({
  commands() {
    this.create(['ping:pong', 'tik:tok']).showInHelp().docs({ description: 'What are you doing?' }).action(noop);

    this
      .create('get:detail')
      .docs({
        description: 'Get User Detail',
      })
      .options({
        id: rule.number,
        name: rule.string.docs({
          description: 'User Name',
        }),
        age: rule.number.default(20),
      }).alias({
        name: 'n',
      })
      .action(noop);
  }
});
